package com.anivia.common.web.annotation;

import com.anivia.common.core.enums.DesensitizedTypeEnum;
import com.anivia.common.web.config.desensitization.DesensitizationSerializer;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.lang.annotation.*;


/**
 * 脱敏注解
 *
 * @author wangj
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@JacksonAnnotationsInside
@JsonSerialize(using = DesensitizationSerializer.class)
public @interface DesensitizationField {
    /**
     * 脱敏方式
     */
    DesensitizedTypeEnum type();
}
